package cn.itcast.crm.dao.impl;

import org.springframework.orm.hibernate5.support.HibernateDaoSupport;

import cn.itcast.crm.dao.CustomerDao;
import cn.itcast.crm.domain.CstCustomer;

public class CustomerDaoImpl extends HibernateDaoSupport implements CustomerDao {

	public void insert(CstCustomer customer) {
		this.getHibernateTemplate().save(customer);
		
	}

	public CstCustomer findCustomerById(Long custId) {
		
		return this.getHibernateTemplate().get(CstCustomer.class, custId);
	}

	

}
